package com.swe.chumsmobile.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.swe.chumsmobile.R;
//import com.swe.chumsmobile.R.layout;
//import com.swe.chumsmobile.R.menu;

public class MainActivity extends Activity {

	// functions and declarations are means nothing!
	// It only uses WebResourcesActivity.java

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		Button courses = (Button) findViewById(R.id.button1);
		Button instructors = (Button) findViewById(R.id.button2);
		Button institutions = (Button) findViewById(R.id.button3);

		courses.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getBaseContext(),
						TopCoursesActivity.class);
				startActivity(intent);
			}
		});
		instructors.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getBaseContext(),
						TopInstructorsActivity.class);
				startActivity(intent);
			}
		});
		institutions.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getBaseContext(),
						TopInstitutionsActivity.class);
				startActivity(intent);
			}
		});

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}

}
